package edu.sctu.practice.class01.fengleilin.assign03.test01;

/**
 * Created by fll on 2015/10/22.
 */
public class CompareInfo {
    /**
     * 创建静态方法equalArea，用来比较图形的面积
     *
     * @param object1
     * @param object2
     * @return
     */

    public static boolean equalArea(GeometricObject object1, GeometricObject object2) {
        if (object1.findArea() > object2.findArea()) {
            return false;
        } else {
            return true;
        }
    }

    /**
     * 创建静态方法displayGeometricObject，用来显示几何对象的信息
     *
     * @param object
     */
    public static void displayGeometricObject(GeometricObject object) {
        System.out.println(object.color);
        System.out.println(object.findArea());
        System.out.println(object.findPerimeter());

    }

}
